]<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>书库管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li class="active"><a href="${ctx}/bookset/place/">书库列表</a></li>
	<li><a href="${ctx}/bookset/place/form?id=${bkPlace.placeid}">书库添加</a></li>
</ul>
<form:form id="searchForm" modelAttribute="bkPlace" action="${ctx}/bookset/place/" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	<label>书库编号：</label><form:input path="gcdCode" htmlEscape="false" maxlength="50" class="input-medium"/>
	&nbsp;&nbsp;
	<label>书库名称：</label><form:input path="gcdName" htmlEscape="false" maxlength="50" class="input-medium"/>
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <tr>
        <th>书库编号</th>
        <th>书库名称</th>
        <th>是否流通</th>
        <th>是否计入资产</th>
        <th>是否为默认书库</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
	<c:forEach items="${page.list}" var="bkplace">
		<tr>
			<td><a href="form?id=${bkplace.placeid}">${bkplace.gcdCode}</a></td>
			<td>${bkplace.gcdName}</td>
			<c:if test="${bkplace.isBorrow eq '0'}"><td>不流通</td></c:if>
			<c:if test="${bkplace.isBorrow eq '1'}"><td>流通</td></c:if>
			<c:if test="${bkplace.isCount eq '0'}"><td>不计入</td></c:if>
			<c:if test="${bkplace.isCount eq '1'}"><td>计入</td></c:if>

            <c:if test="${bkplace.isDefault eq '1'}"><td>是</td></c:if>
            <c:if test="${bkplace.isDefault ne '1'}"><td>否</td></c:if>

			<td>${bkplace.remarks}</td>
				<td>
					<shiro:hasPermission name="bookset:place:edit">
						<a href="${ctx}/bookset/place/form?id=${bkplace.placeid}">修改</a>
						<a href="${ctx}/bookset/place/delete?id=${bkplace.placeid}" onclick="return confirmx('确认要删除该书库吗？', this.href)">删除</a>
					</shiro:hasPermission>
					<shiro:hasPermission name="bookset:place:batchedit">
						<a href="${ctx}/bookset/place/batchedit?id=${bkplace.placeid}"
						   onclick="return confirmx('确认要将所有图书转移到这个书库吗？', this.href)">批量设置书库</a>
					</shiro:hasPermission>
				</td>
		</tr>
	</c:forEach>
</table>
<div class="pagination">${page}</div>
</body>
</html>